//
// Created by ChaoDONG on 2021-03-23.
//

static unsigned long int next = 1; /* 种子　*/

int rand0(void)
{
/* magic formula to generate pseudorandom number */
/* 生成伪随机数的魔术公式 */
    next = next * 1103515245 + 12345;
    return (unsigned int) (next/65536) % 32768;
}